package com.gyp.mapper.user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gyp.dto.user.RoleQueryDTO;
import com.gyp.entity.SysMenu;
import com.gyp.entity.SysRole;
import com.gyp.entity.SysUserEntity;
import com.gyp.vo.base.SysDictData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUserEntity> {



    List<String> selectMenuPermsByRoleId(Long roleId);

    List<String> selectMenuPermsByUserId(Integer userId);

    List<SysRole> selectRolePermissionByUserId(@Param("userId") Integer userId);

    List<Long> listRolesById(Integer userId);

    List<SysMenu> selectMenuTreeByUserId(Integer userId);

    List<SysMenu> selectMenuListByUserId(@Param("data") SysMenu menu,@Param("userId") Integer userId);

    List<SysDictData> selectDictDataByType(@Param("dictType") String dictType);

    Page<SysRole> selectRoleList(Page<Object> objectPage,@Param("data") RoleQueryDTO role);

    List<String> queryUserRole(@Param("userId") Integer userId);

    void insertVipExpireRecord(@Param("content") String content,@Param("userId") Integer userId);
}
